<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let s = Symbol("school")
        let a = {name:"张三",age:100}
        // 定义属性
        Object.defineProperty(a,"school",{
            // 当前属性不可遍历
            enumerable:false,
            value:"青芒"
        })
        a[s] = "学校"

        for(let item in a){
            console.log(item);
        }
        // 对象的遍历  获取所有对象的属性，包含不可遍历
        console.log(Object.getOwnPropertyNames(a));
        // Symbol
        console.log(Object.getOwnPropertySymbols(a));
        // 想知道对象里边的属性 
        console.log(Object.getOwnPropertyDescriptor(a,'name'));
        // 获取到所有的属性
        console.log(Reflect.ownKeys(a));
    </script>
</body>
</html>